package com.movisol.messengercommunicator.data;

public class CommunicatorUri {
	
	private Integer TimeToLive;
	private String Uri;
	
	public CommunicatorUri()
	{
		super();
		TimeToLive = -1;
		Uri = null;
	}
	
	
	public Integer getTimeToLive() {
		return TimeToLive;
	}
	public void setTimeToLive(Integer timeToLive) {
		TimeToLive = timeToLive;
	}
	
	
	public String getUri() {
		return Uri;
	}
	public void setUri(String uri) {
		Uri = uri;
	}
	
	
	@Override
	public String toString() {
		return "CommunicatorUri [TimeToLive=" + TimeToLive + ", Uri=" + Uri
				+ "]";
	}
	
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((TimeToLive == null) ? 0 : TimeToLive.hashCode());
		result = prime * result + ((Uri == null) ? 0 : Uri.hashCode());
		return result;
	}
	
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CommunicatorUri other = (CommunicatorUri) obj;
		if (TimeToLive == null) {
			if (other.TimeToLive != null)
				return false;
		} else if (!TimeToLive.equals(other.TimeToLive))
			return false;
		if (Uri == null) {
			if (other.Uri != null)
				return false;
		} else if (!Uri.equals(other.Uri))
			return false;
		return true;
	}
	
	

}
